using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for KHACHHANG.
     /// </summary>
     public class KHACHHANG
    {
              private Guid _MAKHACHHANG;
      private string _MABARCODE;
      private byte[] _HINHANH;
      private string _CODEKHACHHANG;
      private string _CMND;
      private Int32 _MAKHUVUC;
      private Int32 _MANHOM;
      private Int32 _MALOAIKHACHHANG;
      private string _TENKHACHHANG;
      private string _MASOTHUE;
      private string _NGUOIDAIDIEN;
      private DateTime _NGAYSINH;
      private string _GIOITINH;
      private string _CHUCVU;
      private string _DIACHI;
      private string _DIENTHOAI;
      private string _FAX;
      private string _DIDONG;
      private string _EMAIL;
      private Int32 _CHECKTPYE;
      private string _GHICHU;
      private string _DIACHICONGTY;
      private string _TENTATKHACHHANG;
      private string _CONGTY;
      private string _DIACHIGIAOHOADON;
      private string _DIACHIGIAOHANG;
      private string _DIACHIGIAOHANG2;
      private decimal _TONGCONGNO;
      private decimal _GIOIHANCONGNO;
      private Int32 _GIOIHANSONGAYNO;
      private DateTime _NGAYNOGANNHAT;
      private double _CHIETKHAU;
      private Int32 _CHECKKHUYENMAI;
      private bool _ISUSE;
      private bool _ISDELETE;
      private DateTime _NGAYTAO;
      private string _NGUOITAO;
      private DateTime _NGAYCAPNHAT;
      private string _NGUOICAPNHAT;
      private HOADONXUATKHOList _listHOADONXUATKHO;
      private QUANLYTHETHEOKHACHHANGList _listQUANLYTHETHEOKHACHHANG;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAKHACHHANGNullable
      { get { return false;  } }
      public Guid MAKHACHHANG
      {
         get { return _MAKHACHHANG; }
         set { _MAKHACHHANG = value; }
      }
      public bool IsMABARCODENullable
      { get { return true;  } }
      public string MABARCODE
      {
         get { return _MABARCODE;  }
         set { _MABARCODE = value; }
      }
      public bool IsHINHANHNullable
      { get { return true;  } }
      public byte[] HINHANH
      {
         get { return _HINHANH;  }
         set { _HINHANH = value; }
      }
      public bool IsCODEKHACHHANGNullable
      { get { return true;  } }
      public string CODEKHACHHANG
      {
         get { return _CODEKHACHHANG;  }
         set { _CODEKHACHHANG = value; }
      }
      public bool IsCMNDNullable
      { get { return true;  } }
      public string CMND
      {
         get { return _CMND;  }
         set { _CMND = value; }
      }
      public bool IsMAKHUVUCNullable
      { get { return true;  } }
      public Int32 MAKHUVUC
      {
         get { return _MAKHUVUC;  }
         set { _MAKHUVUC = value; }
      }
      public bool IsMANHOMNullable
      { get { return true;  } }
      public Int32 MANHOM
      {
         get { return _MANHOM;  }
         set { _MANHOM = value; }
      }
      public bool IsMALOAIKHACHHANGNullable
      { get { return true;  } }
      public Int32 MALOAIKHACHHANG
      {
         get { return _MALOAIKHACHHANG;  }
         set { _MALOAIKHACHHANG = value; }
      }
      public bool IsTENKHACHHANGNullable
      { get { return true;  } }
      public string TENKHACHHANG
      {
         get { return _TENKHACHHANG;  }
         set { _TENKHACHHANG = value; }
      }
      public bool IsMASOTHUENullable
      { get { return true;  } }
      public string MASOTHUE
      {
         get { return _MASOTHUE;  }
         set { _MASOTHUE = value; }
      }
      public bool IsNGUOIDAIDIENNullable
      { get { return true;  } }
      public string NGUOIDAIDIEN
      {
         get { return _NGUOIDAIDIEN;  }
         set { _NGUOIDAIDIEN = value; }
      }
      public bool IsNGAYSINHNullable
      { get { return true;  } }
      public DateTime NGAYSINH
      {
         get { return _NGAYSINH;  }
         set { _NGAYSINH = value; }
      }
      public bool IsGIOITINHNullable
      { get { return true;  } }
      public string GIOITINH
      {
         get { return _GIOITINH;  }
         set { _GIOITINH = value; }
      }
      public bool IsCHUCVUNullable
      { get { return true;  } }
      public string CHUCVU
      {
         get { return _CHUCVU;  }
         set { _CHUCVU = value; }
      }
      public bool IsDIACHINullable
      { get { return true;  } }
      public string DIACHI
      {
         get { return _DIACHI;  }
         set { _DIACHI = value; }
      }
      public bool IsDIENTHOAINullable
      { get { return true;  } }
      public string DIENTHOAI
      {
         get { return _DIENTHOAI;  }
         set { _DIENTHOAI = value; }
      }
      public bool IsFAXNullable
      { get { return true;  } }
      public string FAX
      {
         get { return _FAX;  }
         set { _FAX = value; }
      }
      public bool IsDIDONGNullable
      { get { return true;  } }
      public string DIDONG
      {
         get { return _DIDONG;  }
         set { _DIDONG = value; }
      }
      public bool IsEMAILNullable
      { get { return true;  } }
      public string EMAIL
      {
         get { return _EMAIL;  }
         set { _EMAIL = value; }
      }
      public bool IsCHECKTPYENullable
      { get { return true;  } }
      public Int32 CHECKTPYE
      {
         get { return _CHECKTPYE;  }
         set { _CHECKTPYE = value; }
      }
      public bool IsGHICHUNullable
      { get { return true;  } }
      public string GHICHU
      {
         get { return _GHICHU;  }
         set { _GHICHU = value; }
      }
      public bool IsDIACHICONGTYNullable
      { get { return true;  } }
      public string DIACHICONGTY
      {
         get { return _DIACHICONGTY;  }
         set { _DIACHICONGTY = value; }
      }
      public bool IsTENTATKHACHHANGNullable
      { get { return true;  } }
      public string TENTATKHACHHANG
      {
         get { return _TENTATKHACHHANG;  }
         set { _TENTATKHACHHANG = value; }
      }
      public bool IsCONGTYNullable
      { get { return true;  } }
      public string CONGTY
      {
         get { return _CONGTY;  }
         set { _CONGTY = value; }
      }
      public bool IsDIACHIGIAOHOADONNullable
      { get { return true;  } }
      public string DIACHIGIAOHOADON
      {
         get { return _DIACHIGIAOHOADON;  }
         set { _DIACHIGIAOHOADON = value; }
      }
      public bool IsDIACHIGIAOHANGNullable
      { get { return true;  } }
      public string DIACHIGIAOHANG
      {
         get { return _DIACHIGIAOHANG;  }
         set { _DIACHIGIAOHANG = value; }
      }
      public bool IsDIACHIGIAOHANG2Nullable
      { get { return true;  } }
      public string DIACHIGIAOHANG2
      {
         get { return _DIACHIGIAOHANG2;  }
         set { _DIACHIGIAOHANG2 = value; }
      }
      public bool IsTONGCONGNONullable
      { get { return true;  } }
      public decimal TONGCONGNO
      {
         get { return _TONGCONGNO;  }
         set { _TONGCONGNO = value; }
      }
      public bool IsGIOIHANCONGNONullable
      { get { return true;  } }
      public decimal GIOIHANCONGNO
      {
         get { return _GIOIHANCONGNO;  }
         set { _GIOIHANCONGNO = value; }
      }
      public bool IsGIOIHANSONGAYNONullable
      { get { return true;  } }
      public Int32 GIOIHANSONGAYNO
      {
         get { return _GIOIHANSONGAYNO;  }
         set { _GIOIHANSONGAYNO = value; }
      }
      public bool IsNGAYNOGANNHATNullable
      { get { return true;  } }
      public DateTime NGAYNOGANNHAT
      {
         get { return _NGAYNOGANNHAT;  }
         set { _NGAYNOGANNHAT = value; }
      }
      public bool IsCHIETKHAUNullable
      { get { return true;  } }
      public double CHIETKHAU
      {
         get { return _CHIETKHAU;  }
         set { _CHIETKHAU = value; }
      }
      public bool IsCHECKKHUYENMAINullable
      { get { return true;  } }
      public Int32 CHECKKHUYENMAI
      {
         get { return _CHECKKHUYENMAI;  }
         set { _CHECKKHUYENMAI = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }
      public bool IsNGAYTAONullable
      { get { return true;  } }
      public DateTime NGAYTAO
      {
         get { return _NGAYTAO;  }
         set { _NGAYTAO = value; }
      }
      public bool IsNGUOITAONullable
      { get { return true;  } }
      public string NGUOITAO
      {
         get { return _NGUOITAO;  }
         set { _NGUOITAO = value; }
      }
      public bool IsNGAYCAPNHATNullable
      { get { return true;  } }
      public DateTime NGAYCAPNHAT
      {
         get { return _NGAYCAPNHAT;  }
         set { _NGAYCAPNHAT = value; }
      }
      public bool IsNGUOICAPNHATNullable
      { get { return true;  } }
      public string NGUOICAPNHAT
      {
         get { return _NGUOICAPNHAT;  }
         set { _NGUOICAPNHAT = value; }
      }
public HOADONXUATKHOList HOADONXUATKHOList 
{ 
	get { return _listHOADONXUATKHO; }
	set { _listHOADONXUATKHO = value;}
}
public QUANLYTHETHEOKHACHHANGList QUANLYTHETHEOKHACHHANGList 
{ 
	get { return _listQUANLYTHETHEOKHACHHANG; }
	set { _listQUANLYTHETHEOKHACHHANG = value;}
}

        #endregion

        #region Constructors
        public KHACHHANG()
        {
            Reset();
        }
        public KHACHHANG(KHACHHANG obj)
        {
            	this._MAKHACHHANG = obj.MAKHACHHANG;
	this._MABARCODE = obj.MABARCODE;
	this._HINHANH = obj.HINHANH;
	this._CODEKHACHHANG = obj.CODEKHACHHANG;
	this._CMND = obj.CMND;
	this._MAKHUVUC = obj.MAKHUVUC;
	this._MANHOM = obj.MANHOM;
	this._MALOAIKHACHHANG = obj.MALOAIKHACHHANG;
	this._TENKHACHHANG = obj.TENKHACHHANG;
	this._MASOTHUE = obj.MASOTHUE;
	this._NGUOIDAIDIEN = obj.NGUOIDAIDIEN;
	this._NGAYSINH = obj.NGAYSINH;
	this._GIOITINH = obj.GIOITINH;
	this._CHUCVU = obj.CHUCVU;
	this._DIACHI = obj.DIACHI;
	this._DIENTHOAI = obj.DIENTHOAI;
	this._FAX = obj.FAX;
	this._DIDONG = obj.DIDONG;
	this._EMAIL = obj.EMAIL;
	this._CHECKTPYE = obj.CHECKTPYE;
	this._GHICHU = obj.GHICHU;
	this._DIACHICONGTY = obj.DIACHICONGTY;
	this._TENTATKHACHHANG = obj.TENTATKHACHHANG;
	this._CONGTY = obj.CONGTY;
	this._DIACHIGIAOHOADON = obj.DIACHIGIAOHOADON;
	this._DIACHIGIAOHANG = obj.DIACHIGIAOHANG;
	this._DIACHIGIAOHANG2 = obj.DIACHIGIAOHANG2;
	this._TONGCONGNO = obj.TONGCONGNO;
	this._GIOIHANCONGNO = obj.GIOIHANCONGNO;
	this._GIOIHANSONGAYNO = obj.GIOIHANSONGAYNO;
	this._NGAYNOGANNHAT = obj.NGAYNOGANNHAT;
	this._CHIETKHAU = obj.CHIETKHAU;
	this._CHECKKHUYENMAI = obj.CHECKKHUYENMAI;
	this._ISUSE = obj.ISUSE;
	this._ISDELETE = obj.ISDELETE;
	this._NGAYTAO = obj.NGAYTAO;
	this._NGUOITAO = obj.NGUOITAO;
	this._NGAYCAPNHAT = obj.NGAYCAPNHAT;
	this._NGUOICAPNHAT = obj.NGUOICAPNHAT;
        }
        #endregion

        public void Reset()
        {
                     _MAKHACHHANG = EmptyValues.v_Guid;
         _MABARCODE = EmptyValues.v_string;
         _HINHANH = EmptyValues.v_bytes;
         _CODEKHACHHANG = EmptyValues.v_string;
         _CMND = EmptyValues.v_string;
         _MAKHUVUC = EmptyValues.v_Int32;
         _MANHOM = EmptyValues.v_Int32;
         _MALOAIKHACHHANG = EmptyValues.v_Int32;
         _TENKHACHHANG = EmptyValues.v_string;
         _MASOTHUE = EmptyValues.v_string;
         _NGUOIDAIDIEN = EmptyValues.v_string;
         _NGAYSINH = EmptyValues.v_DateTime;
         _GIOITINH = EmptyValues.v_string;
         _CHUCVU = EmptyValues.v_string;
         _DIACHI = EmptyValues.v_string;
         _DIENTHOAI = EmptyValues.v_string;
         _FAX = EmptyValues.v_string;
         _DIDONG = EmptyValues.v_string;
         _EMAIL = EmptyValues.v_string;
         _CHECKTPYE = EmptyValues.v_Int32;
         _GHICHU = EmptyValues.v_string;
         _DIACHICONGTY = EmptyValues.v_string;
         _TENTATKHACHHANG = EmptyValues.v_string;
         _CONGTY = EmptyValues.v_string;
         _DIACHIGIAOHOADON = EmptyValues.v_string;
         _DIACHIGIAOHANG = EmptyValues.v_string;
         _DIACHIGIAOHANG2 = EmptyValues.v_string;
         _TONGCONGNO = EmptyValues.v_decimal;
         _GIOIHANCONGNO = EmptyValues.v_decimal;
         _GIOIHANSONGAYNO = EmptyValues.v_Int32;
         _NGAYNOGANNHAT = EmptyValues.v_DateTime;
         _CHIETKHAU = EmptyValues.v_double;
         _CHECKKHUYENMAI = EmptyValues.v_Int32;
         _ISUSE = EmptyValues.v_bool;
         _ISDELETE = EmptyValues.v_bool;
         _NGAYTAO = EmptyValues.v_DateTime;
         _NGUOITAO = EmptyValues.v_string;
         _NGAYCAPNHAT = EmptyValues.v_DateTime;
         _NGUOICAPNHAT = EmptyValues.v_string;
	_listHOADONXUATKHO = null;
	_listQUANLYTHETHEOKHACHHANG = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAKHACHHANG"] is DBNull))
		{
			obj.MAKHACHHANG = (Guid)reader["MAKHACHHANG"];
		}
                if(!(reader["MABARCODE"] is DBNull))
		{
			obj.MABARCODE = (string)reader["MABARCODE"];
		}
                if(!(reader["HINHANH"] is DBNull))
		{
			obj.HINHANH = (byte[])reader["HINHANH"];
		}
                if(!(reader["CODEKHACHHANG"] is DBNull))
		{
			obj.CODEKHACHHANG = (string)reader["CODEKHACHHANG"];
		}
                if(!(reader["CMND"] is DBNull))
		{
			obj.CMND = (string)reader["CMND"];
		}
                if(!(reader["MAKHUVUC"] is DBNull))
		{
			obj.MAKHUVUC = (Int32)reader["MAKHUVUC"];
		}
                if(!(reader["MANHOM"] is DBNull))
		{
			obj.MANHOM = (Int32)reader["MANHOM"];
		}
                if(!(reader["MALOAIKHACHHANG"] is DBNull))
		{
			obj.MALOAIKHACHHANG = (Int32)reader["MALOAIKHACHHANG"];
		}
                if(!(reader["TENKHACHHANG"] is DBNull))
		{
			obj.TENKHACHHANG = (string)reader["TENKHACHHANG"];
		}
                if(!(reader["MASOTHUE"] is DBNull))
		{
			obj.MASOTHUE = (string)reader["MASOTHUE"];
		}
                if(!(reader["NGUOIDAIDIEN"] is DBNull))
		{
			obj.NGUOIDAIDIEN = (string)reader["NGUOIDAIDIEN"];
		}
                if(!(reader["NGAYSINH"] is DBNull))
		{
			obj.NGAYSINH = (DateTime)reader["NGAYSINH"];
		}
                if(!(reader["GIOITINH"] is DBNull))
		{
			obj.GIOITINH = (string)reader["GIOITINH"];
		}
                if(!(reader["CHUCVU"] is DBNull))
		{
			obj.CHUCVU = (string)reader["CHUCVU"];
		}
                if(!(reader["DIACHI"] is DBNull))
		{
			obj.DIACHI = (string)reader["DIACHI"];
		}
                if(!(reader["DIENTHOAI"] is DBNull))
		{
			obj.DIENTHOAI = (string)reader["DIENTHOAI"];
		}
                if(!(reader["FAX"] is DBNull))
		{
			obj.FAX = (string)reader["FAX"];
		}
                if(!(reader["DIDONG"] is DBNull))
		{
			obj.DIDONG = (string)reader["DIDONG"];
		}
                if(!(reader["EMAIL"] is DBNull))
		{
			obj.EMAIL = (string)reader["EMAIL"];
		}
                if(!(reader["CHECKTPYE"] is DBNull))
		{
			obj.CHECKTPYE = (Int32)reader["CHECKTPYE"];
		}
                if(!(reader["GHICHU"] is DBNull))
		{
			obj.GHICHU = (string)reader["GHICHU"];
		}
                if(!(reader["DIACHICONGTY"] is DBNull))
		{
			obj.DIACHICONGTY = (string)reader["DIACHICONGTY"];
		}
                if(!(reader["TENTATKHACHHANG"] is DBNull))
		{
			obj.TENTATKHACHHANG = (string)reader["TENTATKHACHHANG"];
		}
                if(!(reader["CONGTY"] is DBNull))
		{
			obj.CONGTY = (string)reader["CONGTY"];
		}
                if(!(reader["DIACHIGIAOHOADON"] is DBNull))
		{
			obj.DIACHIGIAOHOADON = (string)reader["DIACHIGIAOHOADON"];
		}
                if(!(reader["DIACHIGIAOHANG"] is DBNull))
		{
			obj.DIACHIGIAOHANG = (string)reader["DIACHIGIAOHANG"];
		}
                if(!(reader["DIACHIGIAOHANG2"] is DBNull))
		{
			obj.DIACHIGIAOHANG2 = (string)reader["DIACHIGIAOHANG2"];
		}
                if(!(reader["TONGCONGNO"] is DBNull))
		{
			obj.TONGCONGNO = (decimal)reader["TONGCONGNO"];
		}
                if(!(reader["GIOIHANCONGNO"] is DBNull))
		{
			obj.GIOIHANCONGNO = (decimal)reader["GIOIHANCONGNO"];
		}
                if(!(reader["GIOIHANSONGAYNO"] is DBNull))
		{
			obj.GIOIHANSONGAYNO = (Int32)reader["GIOIHANSONGAYNO"];
		}
                if(!(reader["NGAYNOGANNHAT"] is DBNull))
		{
			obj.NGAYNOGANNHAT = (DateTime)reader["NGAYNOGANNHAT"];
		}
                if(!(reader["CHIETKHAU"] is DBNull))
		{
			obj.CHIETKHAU = (double)reader["CHIETKHAU"];
		}
                if(!(reader["CHECKKHUYENMAI"] is DBNull))
		{
			obj.CHECKKHUYENMAI = (Int32)reader["CHECKKHUYENMAI"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
                if(!(reader["NGAYTAO"] is DBNull))
		{
			obj.NGAYTAO = (DateTime)reader["NGAYTAO"];
		}
                if(!(reader["NGUOITAO"] is DBNull))
		{
			obj.NGUOITAO = (string)reader["NGUOITAO"];
		}
                if(!(reader["NGAYCAPNHAT"] is DBNull))
		{
			obj.NGAYCAPNHAT = (DateTime)reader["NGAYCAPNHAT"];
		}
                if(!(reader["NGUOICAPNHAT"] is DBNull))
		{
			obj.NGUOICAPNHAT = (string)reader["NGUOICAPNHAT"];
		}
//            _MAKHACHHANG = (reader["MAKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_Guid:(Guid)reader["MAKHACHHANG"];
//            _MABARCODE = (reader["MABARCODE"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MABARCODE"];
//            _HINHANH = (reader["HINHANH"] is DBNull)?DalTools.EmptyValues.v_bytes:(byte[])reader["HINHANH"];
//            _CODEKHACHHANG = (reader["CODEKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CODEKHACHHANG"];
//            _CMND = (reader["CMND"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CMND"];
//            _MAKHUVUC = (reader["MAKHUVUC"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAKHUVUC"];
//            _MANHOM = (reader["MANHOM"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MANHOM"];
//            _MALOAIKHACHHANG = (reader["MALOAIKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MALOAIKHACHHANG"];
//            _TENKHACHHANG = (reader["TENKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENKHACHHANG"];
//            _MASOTHUE = (reader["MASOTHUE"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MASOTHUE"];
//            _NGUOIDAIDIEN = (reader["NGUOIDAIDIEN"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOIDAIDIEN"];
//            _NGAYSINH = (reader["NGAYSINH"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYSINH"];
//            _GIOITINH = (reader["GIOITINH"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GIOITINH"];
//            _CHUCVU = (reader["CHUCVU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CHUCVU"];
//            _DIACHI = (reader["DIACHI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHI"];
//            _DIENTHOAI = (reader["DIENTHOAI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIENTHOAI"];
//            _FAX = (reader["FAX"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["FAX"];
//            _DIDONG = (reader["DIDONG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIDONG"];
//            _EMAIL = (reader["EMAIL"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["EMAIL"];
//            _CHECKTPYE = (reader["CHECKTPYE"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["CHECKTPYE"];
//            _GHICHU = (reader["GHICHU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GHICHU"];
//            _DIACHICONGTY = (reader["DIACHICONGTY"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHICONGTY"];
//            _TENTATKHACHHANG = (reader["TENTATKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENTATKHACHHANG"];
//            _CONGTY = (reader["CONGTY"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CONGTY"];
//            _DIACHIGIAOHOADON = (reader["DIACHIGIAOHOADON"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHIGIAOHOADON"];
//            _DIACHIGIAOHANG = (reader["DIACHIGIAOHANG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHIGIAOHANG"];
//            _DIACHIGIAOHANG2 = (reader["DIACHIGIAOHANG2"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHIGIAOHANG2"];
//            _TONGCONGNO = (reader["TONGCONGNO"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TONGCONGNO"];
//            _GIOIHANCONGNO = (reader["GIOIHANCONGNO"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["GIOIHANCONGNO"];
//            _GIOIHANSONGAYNO = (reader["GIOIHANSONGAYNO"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["GIOIHANSONGAYNO"];
//            _NGAYNOGANNHAT = (reader["NGAYNOGANNHAT"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYNOGANNHAT"];
//            _CHIETKHAU = (reader["CHIETKHAU"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["CHIETKHAU"];
//            _CHECKKHUYENMAI = (reader["CHECKKHUYENMAI"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["CHECKKHUYENMAI"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
//            _NGAYTAO = (reader["NGAYTAO"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYTAO"];
//            _NGUOITAO = (reader["NGUOITAO"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOITAO"];
//            _NGAYCAPNHAT = (reader["NGAYCAPNHAT"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYCAPNHAT"];
//            _NGUOICAPNHAT = (reader["NGUOICAPNHAT"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOICAPNHAT"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Guid MAKHACHHANG, string MABARCODE, byte[] HINHANH, string CODEKHACHHANG, string CMND, Int32 MAKHUVUC, Int32 MANHOM, Int32 MALOAIKHACHHANG, string TENKHACHHANG, string MASOTHUE, string NGUOIDAIDIEN, DateTime NGAYSINH, string GIOITINH, string CHUCVU, string DIACHI, string DIENTHOAI, string FAX, string DIDONG, string EMAIL, Int32 CHECKTPYE, string GHICHU, string DIACHICONGTY, string TENTATKHACHHANG, string CONGTY, string DIACHIGIAOHOADON, string DIACHIGIAOHANG, string DIACHIGIAOHANG2, decimal TONGCONGNO, decimal GIOIHANCONGNO, Int32 GIOIHANSONGAYNO, DateTime NGAYNOGANNHAT, double CHIETKHAU, Int32 CHECKKHUYENMAI, bool ISUSE, bool ISDELETE, DateTime NGAYTAO, string NGUOITAO, DateTime NGAYCAPNHAT, string NGUOICAPNHAT)
        {
                     this._MAKHACHHANG = MAKHACHHANG;
         this._MABARCODE = MABARCODE;
         this._HINHANH = HINHANH;
         this._CODEKHACHHANG = CODEKHACHHANG;
         this._CMND = CMND;
         this._MAKHUVUC = MAKHUVUC;
         this._MANHOM = MANHOM;
         this._MALOAIKHACHHANG = MALOAIKHACHHANG;
         this._TENKHACHHANG = TENKHACHHANG;
         this._MASOTHUE = MASOTHUE;
         this._NGUOIDAIDIEN = NGUOIDAIDIEN;
         this._NGAYSINH = NGAYSINH;
         this._GIOITINH = GIOITINH;
         this._CHUCVU = CHUCVU;
         this._DIACHI = DIACHI;
         this._DIENTHOAI = DIENTHOAI;
         this._FAX = FAX;
         this._DIDONG = DIDONG;
         this._EMAIL = EMAIL;
         this._CHECKTPYE = CHECKTPYE;
         this._GHICHU = GHICHU;
         this._DIACHICONGTY = DIACHICONGTY;
         this._TENTATKHACHHANG = TENTATKHACHHANG;
         this._CONGTY = CONGTY;
         this._DIACHIGIAOHOADON = DIACHIGIAOHOADON;
         this._DIACHIGIAOHANG = DIACHIGIAOHANG;
         this._DIACHIGIAOHANG2 = DIACHIGIAOHANG2;
         this._TONGCONGNO = TONGCONGNO;
         this._GIOIHANCONGNO = GIOIHANCONGNO;
         this._GIOIHANSONGAYNO = GIOIHANSONGAYNO;
         this._NGAYNOGANNHAT = NGAYNOGANNHAT;
         this._CHIETKHAU = CHIETKHAU;
         this._CHECKKHUYENMAI = CHECKKHUYENMAI;
         this._ISUSE = ISUSE;
         this._ISDELETE = ISDELETE;
         this._NGAYTAO = NGAYTAO;
         this._NGUOITAO = NGUOITAO;
         this._NGAYCAPNHAT = NGAYCAPNHAT;
         this._NGUOICAPNHAT = NGUOICAPNHAT;
        }
    }
}